import pygame
import import_image
class Block(pygame.sprite.Sprite):
    def __init__(self, x = 0, y = 0):
        pygame.sprite.Sprite.__init__(self)
        self.image = pygame.surface.Surface((0,0))
        self.image = pygame.image.load(import_image.filepath("block.png")).convert_alpha()
        self.rect = self.image.get_rect()
        self.rect.top = y
        self.rect.left = x
        
    def set_position(self, x = 0, y = 0):
        self.rect.left = x
        self.rect.top = y
    
    def set_rectangle(self, rect):
        self.rect = rect
        
    def set_image(self, filename):
        self.image = pygame.image.load(import_image.filepath(filename)).convert_alpha()
